import java.util.Arrays;

/**
 * @Version v1.0
 * @Description: TODO
 * @Author ZHANZHONGXIN
 * @Date 2022/5/7 14:46
 * @Copyright 博为峰
 */
public class ArrayTest02 {
    public static void main(String[] args) {
        int[] arr = {10, 21, 9, 11, 26, 6};

        //最值
        Arrays.sort(arr);
//        Arrays.sortInt(arr);

//        Arrays.sortDouble(arr);

        //二分查找（前提有序数组）6 9 10 11 21 26
       int a =  Arrays.binarySearch(arr,21);
        System.out.println(a);

        /*for (int i = 0; i < arr.length; i++) {
            System.out.println("arr[i] = " + arr[i]);
        }*/


    }
}
